import { Entity, PrimaryGeneratedColumn, Column, BaseEntity, ManyToOne, OneToMany, JoinColumn, ManyToMany, JoinTable } from 'typeorm';

@Entity('setting_region')
export class SettingRegion extends BaseEntity {
  @PrimaryGeneratedColumn({ unsigned: true, comment: '地区id' })
  region_id: number;

  @Column({ default: 0, comment: '地区pid' })
  region_pid: number;

  @Column({ length: 127, default: '', comment: '地区路径' })
  region_path: string;

  @Column({ type: 'tinyint', default: 1, comment: '地区级别' })
  region_level: number;

  @Column({ length: 127, default: '', comment: '地区名称' })
  region_name: string;

  @Column({ length: 255, default: '', comment: '地区拼音' })
  region_pinyin: string;

  @Column({ length: 63, default: '', comment: '地区简拼' })
  region_jianpin: string;

  @Column({ length: 3, default: '', comment: '地区首字母' })
  region_initials: string;

  @Column({ length: 31, default: '', comment: '地区区号' })
  region_citycode: string;

  @Column({ length: 7, default: '', comment: '地区邮编' })
  region_zipcode: string;

  @Column({ length: 31, default: '', comment: '地区经度（高德坐标）' })
  region_longitude: string;

  @Column({ length: 31, default: '', comment: '地区纬度（高德坐标）' })
  region_latitude: string;

  @Column({ default: 2250, comment: '排序' })
  sort: number;

  @Column({ type: 'tinyint', default: 0, comment: '是否删除，1是0否' })
  is_delete: number;

  @Column({ type: 'tinyint', default: 0, comment: '是否禁用，1是0否' })
  is_disable: number;

  @Column({ default: 0, comment: '添加用户id' })
  create_uid: number;

  @Column({ default: 0, comment: '修改用户id' })
  update_uid: number;

  @Column({ default: 0, comment: '删除用户id' })
  delete_uid: number;

  @Column({ type: 'datetime', nullable: true, comment: '添加时间' })
  create_time: Date;

  @Column({ type: 'datetime', nullable: true, comment: '修改时间' })
  update_time: Date;

  @Column({ type: 'datetime', nullable: true, comment: '删除时间' })
  delete_time: Date;
}
